<template>
  <div id="" class="houseDetail">
    <h2 v-title="'房源详情'"></h2>
    <!-- 长租 -->
    <div class="houseSlider" v-if="houseInfo.rentType==1">
      <span class="houseState" v-if="houseInfo.auditState==1">待审核</span>
      <span class="houseState" v-else-if="houseInfo.auditState==2">
        <em v-if="houseInfo.state==1">待出租</em>
        <em v-else>已出租</em>
      </span>
      <span class="houseState" v-else-if="houseInfo.auditState==4">审核未通过</span>
      <banner-slider :housePicList="housePicList"></banner-slider>
    </div>
    <!-- 短租 -->
    <div class="houseSlider" v-else>
      <span class="houseState" v-if="houseInfo.auditState==1">待发布</span><!-- 待审核 -->
      <span class="houseState" v-else-if="houseInfo.auditState==2">已发布</span><!-- 审核通过 -->
      <span class="houseState" v-else-if="houseInfo.auditState==4">审核未通过</span><!-- 审核通过 -->
      <banner-slider :housePicList="housePicList"></banner-slider>
    </div>

    <div class="houseInfo">
      <div class="houseTxt">
        <!-- <span>&yen;{{houseInfo.rentMoney/100}}元/月</span> -->
        <span v-if="houseInfo.rentType==1">&yen;{{houseInfo.rentMoney/100}}元/月</span>
        <span v-else>&yen;{{houseInfo.rentDayMoney/100}}元/晚</span>
        <em>
          {{houseInfo.roomNum}}室{{houseInfo.hallNum}}厅{{houseInfo.washroomNum}}卫
          -{{houseInfo.floor}}/{{houseInfo.floorTotal}}层-
          {{houseInfo.houseArea}}㎡
        </em>
        <p>{{houseInfo.title}}</p>
      </div>

      <!-- 关键词 -->
      <div class="keywords">
        <span v-for="(item,index) in houseKeywords" :key="item.key">
          {{item.tag}}
        </span>
      </div>
    </div>
    <!-- 房源配备 -->
    <div class="houseMsgBox">
      <p class="houseTittle">房源配备</p>
      <house-allocation :houseRentConfigList="houseRentConfigList"></house-allocation>
    </div>
    <!-- 房源描述 -->
    <div class="houseMsgBox">
      <p class="houseTittle">房源描述</p>
      <div class="houseDescribe" :class="{'noHidden':isShow}">
        {{houseInfo.description}}
        <span class="showmore" @click="showmore" v-if="!(isShow)">...查看更多</span>
      </div>
    </div>
    <!-- 地理位置 -->
    <div class="houseMsgBox">
      <p class="houseTittle">地理位置</p>
      <a-map class="houseMap" :lat="lat" :lng="lng" :address="houseInfo.address"></a-map>

    </div>

    <div class="fixedBottom">
      <button type="button" name="button" class="blockBtn" @click="editHouseCK">编辑房源</button>
    </div>
  </div>
</template>
<script src="./landlordHouseDetail.js"></script>
<style lang="scss" scoped src="./landlordHouseDetail.scss"></style>
